//
//  HX_TableViewDetail.m
//  UI10-易车
//
//  Created by 韩旭 on 16/7/27.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "HX_TableViewDetail.h"

@implementation HX_TableViewDetail

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatTableView];
    }
    return self;
}
- (void)creatTableView {
    _image = [[UIImageView alloc] initWithFrame:CGRectZero];
    _image.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:_image];
    _lableDetail = [[UILabel alloc] initWithFrame:CGRectZero];
    _lableDetail.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:_lableDetail];
}
- (void)layoutSubviews {
    [super layoutSubviews];
    CGFloat midTop = 5;
    CGFloat midLeft = 5;
    _image.frame = CGRectMake(midLeft, midTop, self.contentView.frame.size.width * 0.3, self.contentView.frame.size.height - midTop * 2);
    _lableDetail.frame = CGRectMake(_image.frame.size.width + _image.frame.origin.x + midLeft, midTop, self.contentView.frame.size.width - _image.frame.size.width - _image.frame.origin.x - midLeft * 2, self.contentView.frame.size.height - 2 * midTop);
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
